package com.iris.live.services.data.repositories;

import com.iris.live.services.data.models.Lsh金融战败原因附属Model;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * Created by xiO on 2016/11/23.
 */
public interface Lsh金融战败原因附属Repository extends JpaRepository<Lsh金融战败原因附属Model, Integer>, JpaSpecificationExecutor<Lsh金融战败原因附属Model> {

    @Query("select u from Lsh金融战败原因附属Model u  where  u.金融战败原因编号 = ?1 ")
    List<Lsh金融战败原因附属Model> getitemByfk(int id);

    @Modifying
    @Query("delete  from Lsh金融战败原因附属Model u  where  u.金融战败原因编号 = ?1 ")
    void deleteItemByfk(int id);

}
